﻿// © Benn Eichhorn 2010
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Algobox.Feeds.Finance.Chix.CHIXMD.Messages
{
    /// <summary>
    /// Singleton Chi-X Debug message
    /// </summary>
    public class Debug : IMessage
    {
        private Debug() { }

        private static Debug m_instance = new Debug();

        /// <summary>
        /// Get's the singleton instance of the Debug class
        /// </summary>
        /// <returns>Current Debug</returns>
        public static Debug GetInstance() { return m_instance; }

        public static Debug GetInstance(string text)
        {
            m_instance.Text = text;
            return m_instance; 
        }
        
        public char MessageType { get { return '+'; } }
        public string Text;

        public override string ToString()
        {
            return "IMessage->Debug:Text=" + Text;
        }
    }
}
